#ifndef unigame_Display_h
#define unigame_Display_h

#include "transform/Vector4.h"
#include "config/Def.h"

namespace unigame
{
	class Display
	{
	public:
		Display(int32u disID):m_id(disID), m_isAspectChange(false), m_isScaleFix(true), m_viewSize(0, 0, 1, 1){};
		~Display(){};

		Vector4f& viewSize()
		{
			return m_viewSize;
		}

		void viewSize(float x, float y, float w, float h);

		Vector4f& viewPixel()
		{
			return m_viewPixel;
		}

		void viewPiexl(float x, float y, float w, float h);

		int32u getID()
		{
			return m_id;
		}

		void resize();

		float getAspect()
		{
			return m_viewPixel.w / m_viewPixel.z;
		}

		bool isAspectChange()
		{
			return m_isAspectChange;
		}

		void update();
		void viewPort();

		bool isScaleFix()
		{
			return m_isScaleFix;
		}

		void isScaleFix(bool isFix)
		{
			m_isScaleFix = isFix;
		}

	private:
		Vector4f m_viewSize;
		Vector4f m_viewPixel;
		int32u m_id;
		bool m_isScaleFix;
		bool m_isAspectChange;
	};
}

#endif